package com.example.day0824_ui.slice.slice;

import com.example.day0824_ui.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Text;
import ohos.agp.window.dialog.ToastDialog;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class Login_AbilitySlice extends AbilitySlice {

    private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP,0x00201,"MY_TAG");

    @Override
    public void onStart(Intent intent) {
        new ToastDialog(this).setText("登录成功").show();
        HiLog.info(LABEL,"onStart");
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_login_);

        Text text = (Text)findComponentById(ResourceTable.Id_logAb_t1);
        text.setText(intent.getStringParam("value"));
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
